package com.bao.shop.entity;

import java.math.BigDecimal;

/**
 * @author baoye
 * @date 2024-07-25/19:01
 */
public class Goods {
    private String goodsId;//编号
    private GoodsName name;//名称
    private BigDecimal price;//价格
    private Integer stock;//库存

    public Goods(String goodsId,GoodsName name, BigDecimal price, Integer stock) {
        this.goodsId = goodsId;
        this.name=name;
        this.price = price;
        this.stock = stock;
    }

    public Goods() {
    }

    public String getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(String goodsId) {
        this.goodsId = goodsId;
    }



    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public Integer getStock() {
        return stock;
    }

    public void setStock(Integer stock) {
        this.stock = stock;
    }

    public GoodsName getName() {
        return name;
    }

    public void setName(GoodsName name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "商品编号: " + goodsId +
                "\t商品名称: " + name  +
                "\t商品价格: " + price +
                "\t商品库存: " + stock;
    }

}
